using B.S.XZYData.ErrorCode;
using MediatR;
using System.Collections.Generic;

namespace B.S.XZYData.Api.Wrter.Application.Command.WorkReportDefectiveItem
{
    /// <summary>
    /// 导入报工-不良品项子表命令（批量导入）
    /// </summary>
    public class ImportWorkReportDefectiveItemsCommand : IRequest<ApiResult<int>>
    {
        /// <summary>
        /// 待导入的不良品项集合
        /// </summary>
        public List<ItemDto> Items { get; set; } = new();

        /// <summary>
        /// 导入人ID
        /// </summary>
        public int CreatorId { get; set; }

        /// <summary>
        /// 不良品项 DTO
        /// </summary>
        public class ItemDto
        {
            /// <summary>
            /// 关联报工ID
            /// </summary>
            public int WorkReportId { get; set; }

            /// <summary>
            /// 不良品项编码
            /// </summary>
            public string DefectiveCode { get; set; }

            /// <summary>
            /// 不良数量
            /// </summary>
            public int DefectiveQty { get; set; }
        }
    }
} 